<%@ page pageEncoding="UTF-8" contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Spring MVC常用注解</title>
</head>
<body>
<%--Spring MVC常用注解--%>
<h2>1. @RequestParam注解</h2>
<a href="../anno/testRequestParam?name=zhangsan">测试@RequestParam注解(请求参数:name=zhangsan)</a>
<a href="../anno/testRequestParam?uname=haha">测试@RequestParam注解(请求参数:uname=haha)</a>
<hr>

<h2>2. @RequestBody注解</h2>
<form action="../anno/testRequestBody" method="post">
    用户名：<input type="text" name="username" value="zhangsan"><br>
    年龄：<input type="text" name="age" value="18"><br>
    <input type="submit" value="提交">
</form>
<hr>

<h2>3.@PathVariable注解</h2>
<a href="../anno/testPathVariable/12">测试@PathVariable注解(请求参数占位符:12)</a>
<hr>

<h2>4.@RequestHeader注解</h2>
<a href="../anno/testRequestHeader">测试@RequestHeader注解</a>
<hr>

<h2>5.@CookieValue注解</h2>
<a href="../anno/testCookieValue">测试@CookieValue注解</a>
<hr>

<h2>6.@ModelAttribute注解</h2>
<form action="../anno/testModelAttribute" method="post">
    用户名：<input type="text" name="name" value="zhangsan"><br>
    年龄：<input type="text" name="age" value="18"><br>
    故意不提交生日信息<br>
    <input type="submit" value="提交">
</form>
<hr>

<h2>7.@SessionAttributes注解</h2>
<a href="../anno/testSessionAttributes">测试@SessionAttributes注解(在session存入信息)</a><br>
<a href="../anno/getSessionAttributes">测试@SessionAttributes注解(从session获取信息)</a><br>
<a href="../anno/clearSessionAttributes">测试@SessionAttributes注解(清除session信息)</a><br>
<hr>

</body>
</html>
